import 'dart:ffi';

import 'package:flutter/material.dart';
import 'package:lifechart/login/PassWord.dart';
import 'package:lifechart/login/loginPassword.dart';
import 'package:lifechart/login/loginPhone.dart';

import 'logincode.dart';

class Login extends StatefulWidget {
  const Login({Key? key}) : super(key: key);

  @override
  State<Login> createState() => _LoginState();
}

class _LoginState extends State<Login> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      body: Center(
        child: Container(
          margin: EdgeInsets.only(top:300),
          color: Colors.white,
          child: Container(
            width: 400,
            height: 45,
            child: Container(

              child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [

                Container(
                  width: 300,
                  height: 45,
                  child: FlatButton(
                    minWidth: MediaQuery.of(context).size.width-40,
                    highlightColor: Colors.cyan[700],
                    color: Colors.lightBlue,
                    shape: RoundedRectangleBorder(
                      borderRadius: BorderRadius.circular(8)
                    ),
                    onPressed: () {
                    //页面跳转
                    // Navigator.push(context, MaterialPageRoute(builder: (context) =>LoginPassword()));
                    Navigator.push(context, MaterialPageRoute(builder: (context) =>PassWord()));
                  }, child: Container(
                      child:  Text('免注册登陆',style: TextStyle(
                        color: Colors.white
                      ),)
                  ),

                  ),
                )
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}
